package com.clj.cloud.web.entity.form;

import org.springframework.beans.BeanUtils;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import com.clj.cloud.web.entity.po.BasePo;
@ApiModel
@Slf4j
@Data
public class BaseForm<T extends BasePo> {

	/**
	 * 用户名
	 */
	private String username;
	
	/**
	 * From转化为po，进行后续业务处理
	 */
	public T toPo(Class<T> clazz){
		T t =BeanUtils.instantiateClass(clazz);
		BeanUtils.copyProperties(this, t);
		return t;
	}
	
	
}
